<template>
  <div>
    <h2>组合API-v-model</h2>
    <div>{{info}}</div>
    <hr>
    <!-- <TestCom v-model='info' /> -->
    <!-- 上面的写法和下面的是等效的 -->
    <TestCom :modelValue='info' @update:modelValue='info=$event' />
  </div>
</template>
<script>
import TestCom from './TestCom.vue'
import { ref } from 'vue'

export default {
  name: 'App',
  components: { TestCom },
  setup () {
    const info = ref('hello')
    return { info }
  }
}
</script>
